package com.listen.playanddown;

import android.util.Log;

public class NoFastClickUtils {

    private static long lastClickTime = 0;//上次点击的时间

    private static int spaceTime = 1400;//时间间隔

    public static boolean isFastClick() {

        long currentTime = System.currentTimeMillis();//当前系统时间

        boolean isAllowClick;//是否允许点击
        Log.e("----lastClickTime", lastClickTime + "");
        if (currentTime - lastClickTime > spaceTime) {
            isAllowClick = false;
            lastClickTime = currentTime;
        } else {
            isAllowClick = true;

        }


        return isAllowClick;

    }

}
